{#
Copyright (c) 2020 Andy Zhou
MIT License
#}
{% extends 'base.html' %}
{% from 'bootstrap/pagination.html' import render_pagination %}
{% from 'macros.html' import post_actions with context %}
{% block title %}Your posts{% endblock %}
{% block page_content %}
    <div class="row">
    <div class="col-lg-8">
        <ul class="list-group">
        {% if pagination.items | length > 0 %}
            {% for post in pagination.items %}
                <li class="list-group-item">
                    <a href="{{ post.url() }}">{{ post.title }}</a>
                    <p>
                        {{ post.content | striptags | truncate(200) }}
                    </p>
                    <span class="float-right">
                        {{ post_actions(post) }}
                    </span>
            {% endfor %}
        {% else %}
            <p class="display-4">{{ _("Nothing Here") }}</p>
        {% endif %}
        </ul>
        {{ render_pagination(pagination) }}
    </div>
    {% include 'main/_sidebar.html' %}
    </div>
{% endblock page_content %}
